<template>
  <view>
    <house-floor v-for="(item,index) in room" :key="index" :title="item.area+item.building+item.roomnumber"
      @click.native="addroom(item.area,item.building,item.roomnumber)">
    </house-floor>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        room: []
      }
    },
    onLoad(options) {
      console.log(options);
      for (let i = 1; i < 5; i++) {
        for (let j = 1; j < 3; j++)
          this.room.push({
            area: options.room,
            building: options.building,
            roomnumber: i + '0' + j
          })
      }
    },
    methods: {
      addroom(val1, val2, val3) {
        uni.navigateTo({
          url: '/pkg-house/add-roominfo/add-roominfo?area=' + val1 + "&building=" + val2 + "&roomnumber=" + val3
        })
      },
    }
  }
</script>

<style>

</style>
